Subscribe Us

Responsive Advertisement

Advertisement

URI Online Judge | 1953 Robert and Rampant Room solution in cpp

 

uri 1953 solution in cpp

by ujjal roy



#include<bits/stdc++.h>

using namespace std;

main()

{


    int n,a,eh,ep,in;

    string s;

    while(cin>>n)

    {

         eh=0;

        ep=0;

        in=0;


        while(n--)

    {


        cin>>a>>s;

        if(s=="EPR") ep++;

        else if(s=="EHD") eh++;

        else in++;


    }

     cout<<"EPR: "<<ep<<endl;

     cout<<"EHD: "<<eh<<endl;

     cout<<"INTRUSOS: "<<in<<endl;

    }


    return 0;

}


Post a Comment

0 Comments